-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always pass focus props to setFocus #1027
Conversation
blocks/library/code/index.js
Outdated
@@ -26,7 +26,7 @@ registerBlockType( 'core/code', { | |||
return ( | |||
<TextareaAutosize | |||
value={ attributes.content } | |||
onFocus={ setFocus } | |||
onFocus={ () => setFocus( {} ) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid passing a SyntheticEvent
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid passing a
SyntheticEvent
.
Should this be added as an inline comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After 3f65f3c, it doesn't even seem necessary anymore.
Related: #878 |
53b415e
to
6bf7942
Compare
6bf7942
to
90e7f70
Compare
Do you need a fresh review here? Unclear if anything's changed since my last approval. |
Sorry, I left a comment (#1027 (comment)) and made a commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good 👍
This fixes an issue where the toolbar does not hide when typing in a quote block or table. Somehow I don't like that this is the responsibility of the block implementor but yeah. :)